Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 5 - Objects and References / References to Files and Applications
References to Applications


References to Remote Applications

If the application is on a remote computer, you must specify its name as it would be listed in the Application menu, the name of the computer, and if necessary the name of the zone in which the computer is located:

quit application "Scriptable Text Editor" ÿ   of machine "Mr.Science" of zone "Far Side"
The specified remote application must be running. AppleScript doesn't open applications on remote computers. In addition, the computer that contains the application and the computer on which the script is run must be connected to an AppleTalk network, program linking (set with the Sharing Setup control panel) must be enabled, access for the user (set with the Users & Groups control panel) must be provided, and the application must allow remote program linking (set by selecting the application, choosing Sharing from the File menu, and selecting the checkbox labeled "Allow remote program linking"). For information about these menus and control panels, see the user's guide for your Macintosh computer.

This script sends several commands to an application on a remote computer:

tell application "Scriptable Text Editor" of ÿ   machine "Pegi's Mac" of zone "Publications"      open file "HD:Reports:Status Report"      set pegisReport to text from paragraph 1 to  ÿ         paragraph 4 of document "Status Report"      close document "Status Report"end tell
tell application "Scriptable Text Editor"   open file "Department Status"   copy pegisReport to end of document "Department Status"tell app "Scriptable Text Editor" to quit


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996